package lesson

import (
	"context"
	"server/internal/model"
	"server/internal/service"

	"server/api/lesson/user"
)

func (c *ControllerUser) Register(ctx context.Context, req *user.RegisterReq) (res *user.RegisterRes, err error) {
	res = new(user.RegisterRes)
	res.ID, err = service.LessonUser().Register(ctx, model.LessonUserRegisterInput{
		Name:     req.Name,
		Phone:    req.Phone,
		Password: req.Password,
	})
	return
}
